/// 评论数据模型
class CommentModel {
  final String commentId;
  final String postId;
  final String userId;
  final String content;
  final DateTime commentTime;

  const CommentModel({
    required this.commentId,
    required this.postId,
    required this.userId,
    required this.content,
    required this.commentTime,
  });

  /// 复制并修改模型
  CommentModel copyWith({
    String? commentId,
    String? postId,
    String? userId,
    String? content,
    DateTime? commentTime,
  }) {
    return CommentModel(
      commentId: commentId ?? this.commentId,
      postId: postId ?? this.postId,
      userId: userId ?? this.userId,
      content: content ?? this.content,
      commentTime: commentTime ?? this.commentTime,
    );
  }
}
